#include <iostream>
#include <cstdio>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

#define LOG "log.txt"

int main()
{

  int fp1 = open(LOG, O_WRONLY|O_CREAT|O_TRUNC, 0664);
  int fp2 = open(LOG, O_WRONLY|O_CREAT|O_TRUNC, 0664);
  int fp3 = open(LOG, O_WRONLY|O_CREAT|O_TRUNC, 0664);
  int fp4 = open(LOG, O_WRONLY|O_CREAT|O_TRUNC, 0664);
  int fp5 = open(LOG, O_WRONLY|O_CREAT|O_TRUNC, 0664);
  int fp6 = open(LOG, O_WRONLY|O_CREAT|O_TRUNC, 0664);

  printf("%d\n", fp1);
  printf("%d\n", fp2);
  printf("%d\n", fp3);
  printf("%d\n", fp4);
  printf("%d\n", fp5);
  printf("%d\n", fp6);


  return 0;
}

//int main()
//{
//  //C语言
//  fprintf(stdout, "fprintf->stdout\n");
//  fprintf(stderr, "fprintf->stdout\n");
//
//  //C++
//  std::cout << "cout->cout" << std::endl;
//  std::cerr << "cerr->cerr" << std::endl;
//
//  return 0;
//}


